import React from 'react';
import { Button } from 'antd';
import { Loading } from '@ecoding/components.antd';

const C = () => {

    const handler = () => {
        Loading.show({ tip: "正在翻译...", key:"trans" });
        let i = 0;
        setInterval(() => {
            i++;
            Loading.update({ tip: `已翻译${i}个`, key:"trans" });
            if (i == 3) {
                Loading.hide({ key:"trans" });
            }
        }, 1000);
    }

    return (
        <Button onClick={handler}>
            点击出现加载
        </Button>
    );
}

export default C;